﻿using System.Collections.Generic;

namespace GBlog.Core.Data
{
    public class Config
    {
        public string Site { get; set; }
        public string Title { get; set; }
        public string MetaDescription { get; set; }
        public string Heading { get; set; }
        public string Tagline { get; set; }
        public string Crossbar { get; set; }
        public string GoogleAnalyticsId { get; set; }
        public string TwitterUsername { get; set; }
        public string Theme { get; set; }

        public string Domain { get; set; }
        public string Protocol { get; set; }
        public string DefaultArea { get; set; }

        public Dictionary<string, Plugin> Plugins = new Dictionary<string, Plugin>();
        public Plugin Get(string name)
        {
            Plugin output = null;
            Plugins.TryGetValue(name, out output);
            return output;
        }
    }

    public class Plugin
    {
        public bool Subdomain { get; set; }
        public string Url { get; set; }
        public Dictionary<string, string> Settings = new Dictionary<string, string>();

        public string Get(string name)
        {
            string output = null;
            Settings.TryGetValue(name, out output);
            return output;
        }
    }
}